<style type="text/css">
<!--
.dt-tbl-ct-border{
	border-collapse: collapse; 
	border-color: #ccc;
	width:950px; 
	border:1px solid #ccc;
}
td.dt-ct-header{
	width: 150px; 
	background: #dedede
}
td.dt-ct-header-final{
	background: #dedede
}
div.box-content-main table.table-list td.name {
	width: 250px;
}

div.box-content-main table.table-list td.area {
	width: 180px;
}

div.box-content-main table.table-list td.company {
	width: 150px;
}

div.box-content-main table.table-list td.salary {
	width: 120px;
}

div.box-content-main table.table-list td.major {
	width: 180px;
}

label.filter {
	display: inline-block;
	width: 150px;
	margin-left: 30px;
}

select.combo-box {
	width: 150px;
}

#page-content-right #inner .box-filter input.date-picker,#page-content-right #inner .box-filter input
	{
	margin-top: 3px;
	margin-bottom: 2px;
	width: 138px;
}

#page-content-right #inner .box-filter {
	padding: 20px 10px;
}

.td-border-top {
	border-top: 1px solid #dedede;
}

.td-border-bottom {
	border-bottom: 1px solid #dedede;
}

.info-detail {
	border: 1px solid #dedede;
	padding: 10px;
	background: #fff;
	line-height: 2.5em;
}

.dt-label {
	display: inline-block;
	width: 180px;
}

.dt-lb-content {
	padding: 1px;
	border-bottom: 1px dotted #666;
	display: inline-block;
	width: 200px;
}
.dt-lb-content + .dt-label{
	margin-left:177px;
}
div.dt-lb-content {
	padding: 5px;
	border: 1px dotted #666;
	line-height: normal;
	display: block;
	width: 940px;
}

div.dt-control {
	text-align: right;
	padding: 10px 10px;
}

div.dt-control a {
	color: #00f;
}
div.title{
	text-align: center;
	font-size: 16px;
	font-weight: bold;
	padding:0px 30px 0px 0px;
}
-->
</style>
<?php 
	$val = $data['job'];
	$cmpany = CompaniesTable::getDataById($val['company_id']);
?>
<div class="info-detail">
	<div class="title"><?php echo $val['title']?></div>
	<label class="dt-label"><?php echo __('label_company',  null, 'company_jobs')?></label>
	<span class="dt-lb-content"><?php echo $cmpany['company_name'] ?></span>
	<label class="dt-label"><?php echo __('label_gender',  null, 'company_jobs')?></label>
	<span class="dt-lb-content"><?php echo __('gender_'.str_replace('-','_', $val['require_gender']),null,'array_data')?></span>
	
	<br/>
	<label class="dt-label"><?php echo __('label_position_id',  null, 'company_jobs')?></label>
	<span class="dt-lb-content">
	<?php
			$com = CompanyPersonContactPositionsTable::getDataById ( $val ['position_id'] );
			echo empty ( $com ['name'] ) ? 'N/A' : $com ['name']?>
	</span> 
	<label class="dt-label"><?php echo __('label_date',  null, 'company_jobs')?></label>
	<span class="dt-lb-content"><?php echo DateHelper::dateFormatFree($val['date_from'], 'Y-m-d')?> : <?php echo DateHelper::dateFormatFree($val['date_to'], 'Y-m-d')?></span>
	
	<br /> 
	<label class="dt-label"><?php echo __('label_number_recruitment',  null, 'company_jobs')?></label>
	<span class="dt-lb-content"><?php echo $val['number_recruitment'] ?></span>
	<label class="dt-label"><?php echo __('label_require_year',  null, 'company_jobs')?></label>
	<span class="dt-lb-content"><?php echo $val['require_year_experience'], __('require_year_unit', null, 'company_jobs') ?></span>
	
	<br /> 
	<label class="dt-label"><?php echo __('label_probation_time',  null, 'company_jobs')?></label>
	<span class="dt-lb-content"><?php echo $val['probation_time'] ?></span>
	<label class="dt-label"><?php echo __('label_probation_salary',  null, 'company_jobs')?></label>
	<span class="dt-lb-content"><?php echo $val['probation_salary']?></span>
	
	<br /> 
	<label class="dt-label"><?php echo __('label_age',  null, 'company_jobs')?></label>
	<span class="dt-lb-content"><?php echo $val['age_from'],' : ', $val['age_to'] ?></span>
	<label class="dt-label"><?php echo __('label_is_recruit',  null, 'company_jobs')?></label>
	<span class="dt-lb-content"><?php echo __('is_recruit_'.$val['is_recruit'], null, 'array_data')?></span>
	
	<br /> 
	<label class="dt-label"><?php echo __('label_education_level',  null, 'company_jobs')?></label>
	<span class="dt-lb-content"><?php 
	$level = JobToEducationLevelsTable::getListByJobId($val['id']);
	$str = '';
	foreach($level as $l):
		echo $str, $data['levels'][$l['education_level_id']]['name'];
		$str = ', ';
	endforeach; 
	?></span>
	<label class="dt-label"><?php echo __('label_major',  null, 'company_jobs')?></label>
	<span class="dt-lb-content"><?php 
	$major = JobToMajorsTable::getListByJobId($val['id']);
	$str = '';
	foreach($major as $l):
	echo $str, $data['majors'][$l['major_id']]['name'];
	$str = ', ';
	endforeach;
	if(count($major) == 0) echo '&nbsp;';
	?></span>
	
		
	<br /> 
	<label class="dt-label"><?php echo __('label_location',  null, 'company_jobs')?></label>
	<span class="dt-lb-content"><?php 
	$locations = LocationCitiesTable::getDataListByJobId($val['id']);
	$str = '';
	foreach($locations as $l):
		echo $str, $l['name'];
		$str = ', ';
	endforeach; 
	if(count($locations) == 0) echo '&nbsp;';
	?></span>
	<label class="dt-label"><?php echo __('label_major_text',  null, 'company_jobs')?></label>
	<span class="dt-lb-content">
		<?php echo empty($val['major_text'])?'&nbsp;':$val['major_text']?>
	</span>
	
	
	<br /> 	
	<label class="dt-label"><?php echo __('label_description',  null, 'company_jobs')?></label><br />
	<div class="dt-lb-content"><?php echo html_entity_decode(nl2br($val['description']))?></div>
	
	<br />
	<label class="dt-label"><?php echo __('label_require_description',  null, 'company_jobs')?></label><br />
	<div class="dt-lb-content"><?php echo html_entity_decode(nl2br($val['require_description']))?></div>
	
	<br />
	<label class="dt-label"><?php echo __('label_benefit',  null, 'company_jobs')?></label><br />
	<div class="dt-lb-content"><?php echo empty($val['benefit'])?'&nbsp;':html_entity_decode(nl2br($val['benefit']))?></div>
	
	<br /> 
	<label class="dt-label"><?php echo __('label_language',  null, 'candidate_candidates')?></label><br />
	<table border="1" style="border-collapse: collapse; border-color: #ccc;width:930px; border:1px solid #ccc" cellpadding="2" cellspacing="0">
		<tr>
			<td class="dt-ct-header"><?php echo __('language_name', null, 'candidate_candidates')?></td>
			<td class="dt-ct-header"><?php echo __('language_level', null, 'candidate_candidates')?></td>
			<td class="dt-ct-header-final"><?php echo __('language_description', null, 'candidate_candidates')?></td>	
		</tr>
		<?php 
		$languages = JobToForeignLanguagesTable::getListByJobId($val['id']);
		foreach($languages as $m):	?>
		<tr>
			<td><?php echo $data['languages'][$m['foreign_language_id']]['name']?></td>
			<td><?php echo $data['language_levels'][$m['foreign_language_level_id']]['name']?></td>
			<td><?php echo html_entity_decode(nl2br($m['work_description']))?></td>
		</tr>
	<?php endforeach; ?>
	<?php if (count($languages) == 0): ?>
		<tr>
			<td colspan="3">
				<?php echo __('no_information', null, 'table_list');?>
			</td>
		</tr>
		
	<?php endif?>
	</table>
	<br /> 
	
	<div id="candidate-searched-<?php echo $val['id']?>" style="display: none">
		<label class="dt-label"><?php echo __('label_candidate_search',  null, 'company_jobs')?></label>
		<div class="candidate-content-scroll" style="max-height: 397px; overflow: auto; border: 1px dotted #ccc;">
			<div class="candidate-content" >
			
			</div>
		</div>
	</div>
</div>
